import request from '/@/utils/request';

// 查询工作班次列表
export function listShift(query?: Object) {
  return request({
    url: '/module/attendance/shift/list',
    method: 'get',
    params: query
  })
}

// 查询工作班次详细
export function getShift(id?: number) {
  return request({
    url: '/module/attendance/shift/' + id,
    method: 'get'
  })
}
export function getShiftList(id?: number) {
  return request({
    url: '/module/attendance/shift/list' + id,
    method: 'get'
  })
}
// 新增工作班次
export function addShift(data?: Object) {
  return request({
    url: '/module/attendance/shift',
    method: 'post',
    data
  })
}

// 修改工作班次
export function updateShift(data?: Object) {
  return request({
    url: '/module/attendance/shift',
    method: 'put',
    data
  })
}

// 删除工作班次
export function delShift(id?: number) {
  return request({
    url: '/module/attendance/shift/' + id,
    method: 'delete'
  })
}

// 导出工作班次
export function exportShift(query?: Object) {
  return request({
    url: '/module/attendance/shift/export',
    method: 'get',
    params: query
  })
}
